package com.grape.dp.adapter.simple;

import java.util.HashMap;
import java.util.List;

/**
 * 描述:ListAdapter
 * @author: myx
 * @date: 2019/7/29 0029
 * Copyright © 2019-grape. All rights reserved.
 */
public class ListAdapter extends HashMap {
    // 目标对象新版本
    private List list;

    public ListAdapter(List list) {
        this.list = list;
    }

    @Override
    public int size() {
        return list.size();
    }

    @Override
    public Object get(Object key) {
        return list.get(Integer.valueOf(key.toString()).intValue());
    }
}
